<template>
	<view class="pages-equity-notice-detail">
		<u-parse :content="notice_info.content"></u-parse>

		<view class="box btn-box">
			<view class="btn-box--content">
				<u-button text="我的留言" shape="circle" plain color="#FF0000"
					@click="handleToPage('/pages/equity-sub/message/list', { notice_id: notice_info.id, equity_config_id: equity_config_info.id, message_type: 'notice' })"></u-button>
				<u-button text="我要留言" shape="circle" color="#2DCC75"
					@click="handleToPage('/pages/equity-sub/message/send', { notice_id: notice_info.id, equity_config_id: equity_config_info.id, message_type: 'notice' })"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
	import dataList from '@/data/list.json'
	import MessageItem from '../components/message-item.vue'
	export default {
		components: {
			MessageItem,
		},
		data() {
			return {
				equity_config_info: {
					id: 0,
				},
				notice_info: {
					id: 0,
					content: `
					<p style="text-align: center;font-size: 18px;font-weight: 600;color:#000000;">2024届学生毕业及离校相关工作安排来啦</p>
					<p style="text-align: center;color: #999999;">2025-01-15</p>
					<p style="text-align: center;">露从今夜白，月是故乡明</p>
					<p style="text-align: center;">在这个特别的季节里，</p>
					<p style="text-align: center;">我们不仅要搞别同窗，</p>
					<p style="text-align: center;">更要告别那段青涩的岁月。</p>
					<p style="text-align: center;">但请记住，毕业不是结束，</p>
					<p style="text-align: center;">而是新的开始。</p>
					<p style="text-align: center;">未来的路上，无论我们走到哪里，</p>
					<p style="text-align: center;">母校都是我们永远的港湾。</p>
					<p style="text-align: center;">让我们怀揣着梦想，勇敢前行，</p>
					<p style="text-align: center;">用我们的努力和成就，</p>
					<p style="text-align: center;">为母校增光添彩。</p>
					<p style="text-align: center;">愿每一位毕业生前程似锦，未来可期。</p>
					<p style="text-align: center;">再见不是告别，而是重逢的约定。</p>
					<p style="text-align: center;">让我们共同期待下一次花开时节，</p>
					<p style="text-align: center;">再回母校，重温那段难忘的青春岁月。</p>
					<img src="/static/images/equity-banner.png" style="width: 100%; height: 100%;" />
				`,
				}
			}
		},
		onLoad(options) {
			this.notice_info.id = options.notice_id || 0
			this.equity_config_info.id = options.equity_config_id || 0
			uni.setNavigationBarTitle({
				title: '毕业生优惠公告'
			});
		},
		methods: {
			load({ page, pageSize }) {
				this.$refs.xlist.success(dataList.data)
				// this.$refs.xlist.fail()
			},
			handleToPage(path, params = {}) {
				uni.$u.route({
					url: path,
					params: params
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.pages-equity-notice-detail {
		padding: 20rpx;
		background-color: #f8f8f8;
		position: relative;

		.btn-box {
			position: fixed;
			left: 0;
			bottom: 0;
			width: 100%;
			background-color: transparent;

			&--content {
				display: flex;
				gap: 20rpx;
				width: calc(100% - 40rpx);
				margin: 20rpx;
			}
		}
	}
</style>
